package cn.circle.system.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 功能菜单类 对应数据库表：SYS_MENUS 
 */
@Entity
@Table(name = "SYS_MENUS")
@DynamicInsert(true)
@DynamicUpdate(true)
public class SysMenus implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer id; // 编号
	private Integer parentId; // 父编号
	private String name; // 菜单名称
	private Short type; // 1，菜单组 2，菜单项 3，功能
	private String winId; // 菜单所对应的窗体的ID号，为GUID值，唯一的
	private String winClass; // 菜单所对应的窗体类名称，如果有子菜单，那么为空
	private String iconClass; // 菜单图标类名称
	private String shortcutIconClass; // 快捷图标类名称
	private String url; // 链接地址
	private Integer showOrder; // 显示图片
	private String img; // 显示图片
	private String overImg; // 鼠标移过图片
	private Byte status; // 0:禁用，9：显示，8：不显示，用来设置界面上的增加、删除、修改功能

	@Id
	@Column(name = "ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO) // 自增长
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "PARENT_ID")
	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@NotEmpty(message="菜单名称不能为空！")
	@Column(name = "NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "TYPE")
	public Short getType() {
		return type;
	}

	public void setType(Short type) {
		this.type = type;
	}

	@Column(name = "WIN_ID")
	public String getWinId() {
		return winId;
	}

	public void setWinId(String winId) {
		this.winId = winId;
	}

	@Column(name = "WIN_CLASS")
	public String getWinClass() {
		return winClass;
	}

	public void setWinClass(String winClass) {
		this.winClass = winClass;
	}

	@Column(name = "ICON_CLASS")
	public String getIconClass() {
		return iconClass;
	}

	public void setIconClass(String iconClass) {
		this.iconClass = iconClass;
	}

	@Column(name = "SHORTCUT_ICON_CLASS")
	public String getShortcutIconClass() {
		return shortcutIconClass;
	}

	public void setShortcutIconClass(String shortcutIconClass) {
		this.shortcutIconClass = shortcutIconClass;
	}

	@Column(name = "URL")
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "SHOW_ORDER")
	public Integer getShowOrder() {
		return showOrder;
	}

	public void setShowOrder(Integer showOrder) {
		this.showOrder = showOrder;
	}

	@Column(name = "IMG ")
	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	@Column(name = "OVER_IMG")
	public String getOverImg() {
		return overImg;
	}

	public void setOverImg(String overImg) {
		this.overImg = overImg;
	}

	
	@Column(name = "STATUS",nullable = false)
	public Byte getStatus() {
		return status;
	}

	public void setStatus(Byte status) {
		this.status = status;
	}

}
